package com.woniuxy.service;

import com.woniuxy.entity.DTO.ShopProductsDTO;
import com.woniuxy.entity.ShopProducts;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * (ShopProducts)表服务接口
 *
 * @author makejava
 * @since 2025-07-10 11:54:17
 */
public interface ShopProductsService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    ShopProducts queryById(Long id);

    /**
     * 分页查询
     *
     * @param shopProducts 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<ShopProducts> queryByPage(ShopProducts shopProducts, PageRequest pageRequest);

    /**
     * 新增数据
     *
     * @param shopProducts 实例对象
     * @return 实例对象
     */
    ShopProducts insert(ShopProducts shopProducts);

    /**
     * 修改数据
     *
     * @param shopProducts 实例对象
     * @return 实例对象
     */
    ShopProducts update(ShopProducts shopProducts);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Long id);

    List<ShopProducts> queryHotSalesById(Integer id);
    List<ShopProductsDTO> queryKillSalesById(Integer id);

    List<ShopProducts> findAll();
}
